<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#one{
border: 2px solid black;
position: relative;
background-color: red;
width: 100px;
height: 100px;
left: 200px;
top: 100px;
z-index: 20;
}
#two{
border: 2px solid black;
position: relative;
background-color: blue;
width: 100px;
height: 100px;
left: 270px;
top: 40px;
z-index: 10;
}
#three{
border: 2px solid black;
position: absolute;
background-color: green;
width: 100px;
height: 100px;
left: 290px;
top: 200px;
z-index: 15;
}
</style>
</head>
<body>
<div id="one">第1个div盒子</div>
<div id="two">第2个div盒子</div>
<div id="three">第3个div盒子</div>
</body>
</html>